home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-03-06 | 2.4 KB | 68 lines | [TEXT/GEOL] |
- Item 1600916 30-Nov-90 05:36PST
-
- From: POWERUP.ENG Power Up Software,PRT
-
- To: MACAPP.TECH$ MacApp Technical
-
- Sub: PointerToHex()
-
- Attn: MacApp.Tech$
- SentBy: James Plamondon
- Date 11/29/90
- Subject PointerToHex()
- From James Plamondon
- To MacApp.Tech$
-
- Subject: PointerToHex()
- Gentlepersons,
-
- The UMacAppUtilities routine PointerToHex() accepts a pointer (as a longint
- value), a string (by reference), and a 'hexDigits' INTEGER as arguments, and
- returns (in the given string) the string representation of the given longint
- value.
-
- That is all fine, and useful. What I don't understand is what actual value to
- supply for the 'hexDigits' formal argument.
-
- MacApp calls PointerToHex() in only five places:
- CALLED FROM: hexDigits:
- ptr to object?
- ———————— —————— ————————
- TObjectView.Draw() 6
- Yes
- TObjListView.DrawItem() 6
- Yes
- GLOBAL.GetFrameInfo() 8
- No
- TPrintHandler.GetInspectorName() 8
- Yes
- GLOBAL.StdFieldToString() 8
- No
-
- There does not seem to be any pattern to the value supplied to hexDigits: it
- is either 6 or 8, but which of those values is passed appears (to my untrained
- eye) to be random.
-
- I want a GetInspectorName() override to include the value of an object
- reference in the resulting inspector name. That usage parallels the example
- provided by TPrintHandler.GetInspectorName(), and would imply that I should
- pass the value 8 for hexDigits.
-
- On the other hand, I want to have the resulting string match that displayed by
- the inspector in other places; that would suggest that I pass the value 6 for
- hexDigits, as is done by the Inspector routines Draw() and DrawItem().
-
- Which value should I use? And why isn't MacApp's usage more consistent?
-
- I had expected that there would be no hexDigits argument to PointerToHex(),
- but that the value would be derived, inside PointerToHex(), from some
- indication (from Gestalt) of whether or not the application was using 32-bit
- addresses. What am I missing, which explains why this is not the case?
-
- Hoping for simple answers to these puzzling questions, I remain
-
- Yours,
-
- James Plamondon
-
-